package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.SalvageEventsInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.AdminSalvageEventsPageVO;
import com.sc.nft.entity.vo.salvageEvents.SalvageEventsPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 分解活动主表(sc_salvage_events_info)数据Mapper
 *
 * @author Sun
 * @since 2023-08-10 13:40:39
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface SalvageEventsInfoMapper extends BaseMapper<SalvageEventsInfo> {

    /**
     * 后台分页获取分解活动列表
     * @param page
     * @param eventsName
     * @return
     */
    Page<AdminSalvageEventsPageVO> getAdminSalvageEventsPage(Page page,@Param("eventsName") String eventsName);

    /**
     * 分页获取分解活动列表
     * @param page
     * @return
     */
    Page<SalvageEventsPageVO> getSalvageEventsPage(Page page,@Param("showSalvagePrefecture") Integer showSalvagePrefecture);

    /**
     * 修改可用上限
     * @param id
     * @param usableCount
     * @return
     */
    boolean subUsableCountById(@Param("id") Long id,@Param("usableCount") Integer usableCount);
}
